package com.ruoyi.security.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author yeoman
 * @description 债券交易所枚举
 */
@Getter
@AllArgsConstructor
public enum BondExchangeEnum {
    /**
     * 沪市债券
     */
    SH_Z("sh_z", "沪市债券"),
    /**
     * 深市债券
     */
    SZ_Z("sz_z", "深市债券");

    private final String key;
    private final String desc;

    public static String getDesc(String key) {
        for (BondExchangeEnum value : BondExchangeEnum.values()) {
            if (value.key.equals(key)) {
                return value.getDesc();
            }
        }
        return null;
    }

}
